<template>
    <div>
           <!-- 头部导航 -->
        <div class="navbar">
            <img class="tb" src="/img/fh.png" alt="" @click="onClickLeft">
            <span>上门遛狗</span>
        </div>
        <!-- 地址 -->
        <van-address-edit id="aa"
  :area-list="areaList"
  
  show-search-result
  :search-result="searchResult"
  :area-columns-placeholder="['请选择', '请选择', '请选择']"
  @save="onSave"  save-button-style="color:green"
/>
        
    </div>
</template>

<script>
import { areaList } from '@vant/area-data';
    export default {
        data() {
    return {
      areaList,
      searchResult: [],
    };
  },
        methods: {
             //跳转到上门喂猫页面
            onClickLeft() {
                this.$router.push('/dogshopping')
            },
             onSave(content) {
                // Toast('save');
                console.log('地址12333333',content);
                this.$store.commit("address",content)
                this.$router.push('/dogshopping')

            },
        },
    }
</script>
<style>
/* .van-button--danger {
  background-color: #f8e176;
  color: #333;
  border: none;
} */
</style>
<style lang="scss" scoped>
 .navbar{
   width: 100%;
   height: 13vw;
   background-color: white;
   text-align: center;
   line-height: 13vw;
   // background-color: aqua;
   img{  
       position: relative;
       top: 0vw; left: -35vw;
       width: 25px;
       height: 25px;
       display: inline-block;
   }
}
::v-deep .van-button--danger {
  background-color: #f8e176;
  color: #333;
  border: none;
}
</style>